import { BroadCastCall } from "../broadCast/BroadCastCall";
import { MessageBlock } from "../../../../Framework/MQ/MessageBlock";
import { EGateCommand } from "../../../../Message/Command/EGateCommand";
import { SSkillMsg } from "../../../../Message/Game/SSkillMsg";
import { GameProxy } from "../../mvc/GameProxy";
//class SkillInfoCommand
    
    export  class SkillInfoCommand extends BroadCastCall
    {
        constructor(arg1: Object)
        {
            super(arg1);
            return;
        }

        public /* override */ call(arg1: MessageBlock): void
        {
            var loc1=null;
            var loc2=arg1.messageHead.command;
            switch (loc2) 
            {
                case EGateCommand._ECmdGateSkill:
                {
                    loc1 = arg1.messageBase as SSkillMsg;
                    if (loc1.updateType != 0) 
                    {
                        if (loc1.updateType != 1) 
                        {
                            if (loc1.updateType != 2) 
                            {
                                if (loc1.updateType == 4) 
                                {
                                    GameProxy.skillProxy.removeSkill(loc1.skills);
                                }
                            }
                            else 
                            {
                                GameProxy.skillProxy.onSkillUpgrade(loc1.skills);
                            }
                        }
                        else 
                        {
                            GameProxy.skillProxy.onSkillLearned(loc1.skills);
                        }
                    }
                    else 
                    {
                        GameProxy.skillProxy.onSkillListRes(loc1.skills);
                    }
                    break;
                }
                case EGateCommand._ECmdGateSkillUpdate:
                {
                    break;
                }
            }
            return;
        }
    }
